package com.example.demo.aspect;


import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Slf4j
@Aspect
@Component
@Order(1)   //优先级
public class AspectDemo2 {    //切面类


    @Before("com.example.demo.aspect.AspectDemo1.pt()")  //调用别的切点
    public void Before(){
        log.info("AspectDemo2 Before");
    }
    @After("com.example.demo.aspect.AspectDemo1.pt()")       //切面
    public void After(){
        log.info("AspectDemo2   doAfter...");
    }
}
